package code._10string._04sort;

import java.util.Arrays;

public class Demo {
    public static void main(String[] args) {
        String s="sfsdfsdfs";
        //string----》char[]
        char[] chars=s.toCharArray();
        System.out.println(Arrays.toString(chars));

        //排序算法
        Arrays.sort(chars);
        System.out.println(Arrays.toString(chars));

        //使用构造方法
        //chars----->string
        String str = new String(chars);
        System.out.println("str = " + str);

    }

}
